1. Field of the Invention
The present invention relates to a Universal Asynchronous Receiver/Transmitter (UART), and more particularly to an apparatus and a method for detecting baudrate in a UART.
2. Background of the Related Art
Generally, a portable communication device is connected to communicate with an external communication device. A Universal Asynchronous Receiver/Transmitter (UART) converts digital data between two communication devices to facilitate such communication.
Typically, the UART provides various functions. First, the UART can convert bytes input from the portable communication device through a parallel circuit into a serial bits stream to transfer the converted bytes to the external device. Second, the UART can convert the serial bit stream into data bytes of a prescribed size for processing the bit stream in the portable communication device. Third, the UART can add parity bits to transmitted data, confirm the parity of received data, and remove the parity bits of received data. Fourth, the UART can add a start bit and a stop bit to the data to be transmitted to the external device and remove the start bit and the stop bit from the received data. Fifth, the UART can manage the speed of data communications between the portable communication devices to the speed of the exterior communication devices.
The UART described above supports different baudrates. The baudrates include, for example, 75, 150, 300, 600, 1.2K, 2.4K, 3.6K, 4.SK, 7.2K, 9.6K, 14.4K, 19.2K, 28.8K, 38.4K, 57.6K, 115.2K and 230.4K baud. Accordingly, the UART can select an optimum baudrate through a parity checking process (hereinafter referred to as “parity-check”) based on the received data.
FIG. 1 is a schematic block diagram illustrating a related universal asynchronous receiver/transmitter. Referring to FIG. 1, a UART 10 can detect an optimum baudrate for received data through a parity check of multiple baudrates after receiving a constant amount of data through a receiving terminal RX. The multiple baudrates include, for instance, 75, 150, 300, 600, 1.2K, 2.4K, 3.6K, 4.8K, 7.2K, 9.6K, 14.4K, 19.2K, 28.8K, 38.4K, 57.6K, 115.2K and 230.4K which can be predetermined in the UART 10. Generally, a previously known baudrate detection process is conducted by a built-in program in the UART 10 wherein an initial baudrate is set at a maximum baudrate of 230.4K baud. When data is input, the UART 10 determines whether an error is generated based on the initial baudrate. If no error exists, the initial baudrate is determined to be the optimum baudrate. If there is an error, however, the baudrate is set to 115.2K baud and the UART 10 again checks for an error. The foregoing process is repeated until an optimum baud rate is determined, or until the lowest baudrate, for instance 75 baud, has resulted in an error.
The system and method of the related art has various problems. For example, it takes a long time to search for the optimum baudrate among various baudrates via parity check. Moreover, a part of the received data is often lost during the operation as described above.
The above references are incorporated by reference herein where appropriate for appropriate teachings of additional or alternative details, features and/or technical background.